package com.zhang.springbootdemo.service.impl;

import com.github.pagehelper.PageInfo;
import com.zhang.springbootdemo.mapper.EmployeeMapper;
import com.zhang.springbootdemo.pojo.Employee;
import com.zhang.springbootdemo.service.EmployeeService;
import com.zhang.springbootdemo.vo.DepEmp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;
    @Override
    public boolean addEmp(Employee emp) {
        return employeeMapper.addEmp( emp);
    }



    @Override
    public boolean delEmpByid(Integer eId){
        return employeeMapper.delEmpByid(eId);
    };

    @Override
    public boolean editEmp(Employee emp){
        return employeeMapper.editEmp(emp);
    };

    @Override
    public List<Employee> selEmp() {
        return employeeMapper.selEmp();
    }

    @Override
    public List<DepEmp> selAll() {
        return employeeMapper.selAll();
    }

    @Override
    public DepEmp selAllById(Integer eId) {
        return employeeMapper.selAllById(eId);
    }

    @Override
    public boolean editEmps(DepEmp depEmp) {
        return employeeMapper.editEmps(depEmp);
    }

    @Override
    public List selEmps(Employee employee) {
        return employeeMapper.selEmps(employee);
    }


}
